Skip to content

Conversation

gjoseph92
Copy link

If a change is submitted directly with HasTraits.notify_change, _notify_observers (which handles turning a dict to a Bunch) has been replaced with hold, which needs to be prepared for plain dicts.

If a change is submitted directly with `HasTraits.notify_change`, `_notify_observers` (which handles turning a `dict` to a `Bunch`) has been replaced with `hold`, which needs to be prepared for plain `dicts`.
Copy link
Contributor

@rmorshea rmorshea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just add a test for this, and I think we can get it in.

@@ -1164,6 +1164,9 @@ def compress(past_changes, change):
return past_changes

def hold(change):
if not isinstance(change, Bunch):
# cast to bunch if given a dict
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to nitpick. Can you just tab in this comment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants